<template>
  <el-dialog
    title="走访问卷"
    :visible.sync="DialogVisible"
    width="60%"
    center
  >
    <div class="iframe_box">
      <div class="head_box">
        <div class="short_name">{{ item.shortName || "null" }}</div>
        <div class="head_box_right">
          <div class="enterprise_name">{{ item.corpName }}</div>
          <div class="enterprise_xydm">统一代码 {{ item.corpCredit }}</div>
        </div>
      </div>
    </div>
    <div class="contant_box">
      <div class="title_box">
        <img
          src="@/assets/images/REQUIRED.png"
          alt=""
          class="REQUIRED_imp"
        />
        01. <span class="question_type">【单选】</span> 企业是否从银行体系获得过融资:
      </div>
      <div class="input_box">
        <div>
          <el-radio-group v-model="answer.q1">
            <div class="Radio_box">
              <el-radio label="A" disabled>A、获得过</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="B" disabled>B、未获得过</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="C" disabled>C、因企业注销、无电话且变更地址导致无法联系</el-radio>
            </div>
          </el-radio-group>
        </div>
      </div>

      <div class="title_box">
        <img
          src="@/assets/images/REQUIRED.png"
          alt=""
          class="REQUIRED_imp"
        />
        02. <span class="question_type">【单选】</span> 目前企业是否有融资需求:
      </div>
      <div class="input_box">
        <div>
          <el-radio-group v-model="answer.q2">
            <div class="Radio_box">
              <el-radio label="A" disabled>A、是</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="B" disabled>B、否(企业资金充足，不需要融资)</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="C" disabled>C、否(企业已得到充足融资)</el-radio>
            </div>
          </el-radio-group>
        </div>
      </div>
      <div class="title_box">
        <img
          src="@/assets/images/REQUIRED.png"
          alt=""
          class="REQUIRED_imp"
        />
        03. <span class="question_type"></span> 企业当前资金缺口为:{{ answer.q3 || "__" }}万元。
      </div>

      <div class="title_box">
        <img
          src="@/assets/images/REQUIRED.png"
          alt=""
          class="REQUIRED_imp"
        />
        04. <span class="question_type">【单选】</span> 企业期待获得的银行融资期限为:
      </div>
      <div class="input_box">
        <div>
          <el-radio-group v-model="answer.q2">
            <div class="Radio_box">
              <el-radio label="A" disabled>A、1年以内(含1年)</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="B" disabled>B、1-3年(含3年)</el-radio>
            </div>
            <div class="Radio_box">
              <el-radio label="C" disabled>C、3年以上</el-radio>
            </div>
          </el-radio-group>
        </div>
      </div>

      <div class="title_box">
        <img
          src="@/assets/images/REQUIRED.png"
          alt=""
          class="REQUIRED_imp"
        />
        05.
        <span class="question_type">【多选】</span>
        企业可提供或接受的融资担保方式为:
      </div>
      <div class="input_box">
        <div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_a" disabled>
              <div class="check_box">
                A、信用贷款
              </div>
            </el-checkbox>
          </div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_b" disabled>
              <div class="check_box">
                B、固定资产(房产、车辆、设备等)抵押
              </div>
            </el-checkbox>
          </div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_c" disabled>
              <div class="check_box">C、知识产权质押</div>
            </el-checkbox>
          </div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_d" disabled>
              <div class="check_box">D、其他资产质押</div>
            </el-checkbox>
          </div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_e" disabled>
              <div class="check_box">E、担保公司担保</div>
            </el-checkbox>
          </div>
          <div class="Radio_box">
            <el-checkbox v-model="answer.q5_f" disabled>
              <div class="check_box">
                F、其他第三方担保
              </div>
            </el-checkbox>
          </div>
        </div>

        <div class="title_box">
          <img
            src="@/assets/images/REQUIRED.png"
            alt=""
            class="REQUIRED_imp"
          />
          06. <span class="question_type">【单选】</span> 你行是否可以向该企业提供融资:
        </div>
        <div class="input_box">
          <div>
            <el-radio-group v-model="answer.q6">
              <div class="Radio_box">
                <el-radio label="A" disabled>A、可提供</el-radio>
              </div>
              <div class="Radio_box">
                <el-radio label="B" disabled>B、不可提供</el-radio>
              </div>
              <div class="Radio_box">
                <el-radio label="C" disabled>C、暂不提供，持续跟踪</el-radio>
              </div>
            </el-radio-group>
          </div>
        </div>


        <div class="title_box">
          <img
            src="@/assets/images/REQUIRED.png"
            alt=""
            class="REQUIRED_imp"
          />
          07.
          <span class="question_type">【多选】</span>
          如未提供融资支持，主要原因为:
        </div>
        <div class="input_box">
          <div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_a" disabled>
                <div class="check_box">
                  A、企业经营存在极大不确定性
                </div>
              </el-checkbox>
            </div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_b" disabled>
                <div class="check_box">
                  B、企业负债率过高，存在过度融资的情况
                </div>
              </el-checkbox>
            </div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_c" disabled>
                <div class="check_box">C、企业经营状况恶化，可能存在经营风险</div>
              </el-checkbox>
            </div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_d" disabled>
                <div class="check_box">D、企业暂无法提供有效担保，且不满足信用贷款受理条件</div>
              </el-checkbox>
            </div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_e" disabled>
                <div class="check_box">E、被调查企业或企业主信用(如征信、口碑、结算纪律)较差，存在违约风险</div>
              </el-checkbox>
            </div>
            <div class="Radio_box">
              <el-checkbox v-model="answer.q7_f" disabled>
                <div class="check_box">
                  F、其他
                </div>
              </el-checkbox>
            </div>
          </div>
          <div class="title_box">
            <img
              src="@/assets/images/REQUIRED.png"
              alt=""
              class="REQUIRED_imp"
            />
            08.
            <span class="question_type"></span>
            如已达成合作，此次专项行动开展以来新增业务中，实际表内授信金额为{{ answer.q8_1 || "__" }}万元，其中贷款授信为{{ answer.q8_2 || "__" }}万元。
          </div>

          <div class="title_box">
            <img
              src="@/assets/images/REQUIRED.png"
              alt=""
              class="REQUIRED_imp"
            />
            09.
            <span class="question_type"></span>
            如已达成合作，此次专项行动开展以来新增业务中，企业实际用信金额{{ answer.q9_1 }}万元，贷款余额{{
              answer.q9_2 || "__"
            }}万元，其中首贷余额
            {{ answer.q9_3 || "__" }}万元、中长期贷款余额{{ answer.q9_4 || "__" }}万元、信用贷款余额{{
              answer.q9_5 || "__"
            }}万元、知识产权质押融资余额{{ answer.q9_6 || "__" }}万元。
          </div>
        </div>
      </div>
    </div>
    <!-- <span class="footer">
      <el-button @click="DialogVisible = false">取 消</el-button>
      <el-button type="primary" @click="DialogVisible = false">确 定</el-button>
    </span> -->
  </el-dialog>
</template>

<script>
export default {
  data() {
    return {
      answer: {
        q1: '',
        q2: "",
        q3: "",
        q4: "",
        q5_a: "",
        q5_b: "",
        q5_c: "",
        q5_d: "",
        q5_e: "",
        q5_f: "",
        q6: "",
        q7_a: "",
        q7_b: "",
        q7_c: "",
        q7_d: "",
        q7_e: "",
        q7_f: "",
        q8_1: "",
        q8_2: "",
        q9_1: "",
        q9_2: "",
        q9_3: "",
        q9_4: "",
        q9_5: "",
        q9_6: "",
      },

      item: {
        corpName: "",
        corpCredit: "",
        contactPhone: "",
        addressIsSyn: "",
        visitDate: "",
        visitStatus: "",
        visitRemark: "",
        visitPictureUrl: "",
        questionnaireStatus: "",
        qyQustion: "",
        shortName: "",
        contactPerson: "",
      },
      DialogVisible: false,
      url: "",
    };
  },
  watch: {
    answer(newVal, oldVal) {
      console.log(newVal, oldVal, "监听到了");
      debugger;
      if (newVal.q5_a == "A") {
        this.answer.q5_a = true;
      } else {
        this.answer.q5_a = false;
      }
      if (newVal.q5_b == "B") {
        this.answer.q5_b = true;
      } else {
        this.answer.q5_b = false;
      }
      if (newVal.q5_c == "C") {
        this.answer.q5_c = true;
      } else {
        this.answer.q5_c = false;
      }
      if (newVal.q5_d == "D") {
        this.answer.q5_d = true;
      } else {
        this.answer.q5_d = false;
      }
      if (newVal.q5_e == "E") {
        this.answer.q5_e = true;
      } else {
        this.answer.q5_e = false;
      }
      if (newVal.q5_f == "F") {
        this.answer.q5_f = true;
      } else {
        this.answer.q5_f = false;
      }


      if (newVal.q7_a == "A") {
        this.answer.q7_a = true;
      } else {
        this.answer.q7_a = false;
      }
      if (newVal.q7_b == "B") {
        this.answer.q7_b = true;
      } else {
        this.answer.q7_b = false;
      }
      if (newVal.q7_c == "C") {
        this.answer.q7_c = true;
      } else {
        this.answer.q7_c = false;
      }
      if (newVal.q7_d == "D") {
        this.answer.q7_d = true;
      } else {
        this.answer.q7_d = false;
      }
      if (newVal.q7_e == "E") {
        this.answer.q7_e = true;
      } else {
        this.answer.q7_e = false;
      }
      if (newVal.q7_f == "F") {
        this.answer.q7_f = true;
      } else {
        this.answer.q7_f = false;
      }
    },
  },

  mounted() {
  },
  methods: {
    isShow(item) {
      this.item = item;
      this.answer = JSON.parse(item.answer);
      this.DialogVisible = true;
    },
  },
};
</script>

<style scoped lang="scss">
.iframe_box {
  width: 100%;
}

::v-deep .visit-form::-webkit-scrollbar {
  display: none;
}

::v-deep .el-dialog {
  margin-top: 5px !important;
}

.footer {
  margin-top: 20px;
  display: flex;
  justify-content: center;
}

.head_box {
  width: 100%;
  // height: 125px;
  background: linear-gradient(180deg, #c5d7fb, #e5edfc);
  display: flex;
  padding: 20px;
  background-color: #2b98f0;
  // height: 200px;
  align-items: end;
  background-size: 100% 100%;
  background-repeat: no-repeat;
  // background-image: url("../../../../assets/images/wjdc_head_img.png");
}

.short_name {
  width: 50px;
  height: 50px;
  background-color: #d99d9a;
  font-size: 17px;
  color: white;
  text-align: center;
  display: flex;
  align-items: center;
  justify-content: center;
}

.head_box_right {
  margin-left: 12px;
  color: #000;
  height: fit-content;
}

.enterprise_name {
  font-size: 18px;
}

.enterprise_xydm {
  margin-top: 5px;
  color: #989898;
}

.head_box_right_three {
  display: flex;
  margin-top: 5px;
  align-items: center;
}

.zoufang_type {
  height: 20px;
  padding: 0 10px;
  background-color: #ec847c;
  color: #fff;
}

.wenjuan_type {
  height: 20px;
  padding: 0 10px;
  background-color: #fde9e7;
  color: #e14d3e;
  margin-left: 10px;
}

::v-deep .el-dialog--center .el-dialog__body {
  padding: 0 !important;
}

.ewm_icon {
  margin-left: 10px;

  img {
    height: 20px;
  }
}

.contant_box {
  padding: 0 20px 20px 20px;
}

.module_title {
  border-left: 5px solid #2b98f0;
  padding-left: 10px;
}

.detaile_input {
  // height: 50px;
  // line-height: 50px;
  padding: 20px 0;
  display: flex;
  border-bottom: 2px solid #f5f6f7;
}

.detaile_input_name {
  color: #2b98f0;
  min-width: 70px;
}

.zftp_title {
  padding: 20px 0;
  color: #2b98f0;
}

.zftp_contant {
  width: 100%;
  min-height: 150px;
  text-align: center;
  display: flex;
  justify-content: center;
  align-items: center;
  border: 1px solid #bdbcbc;
}

.title_box {
  margin-top: 20px;
}

.question_type {
  color: #186ff5;
}

.input_box {
  margin: auto;
  margin-top: 15px;
}

.Radio_box {
  margin-bottom: 15px;
}

.check_box {
  white-space: normal;
}

::v-deep .el-checkbox {
  display: flex;
  align-items: center;
}

.REQUIRED_imp {
  margin-bottom: -2px;
}

.score_box {
  display: flex;
}

.score_img {
  margin-right: 20px;
}
</style>
